Path Integrals and Thermochemistry

I’ve made this notebook available to physical chemistry instructors needing an interactive visual for their students.  This notebook is an attempt to help chemistry students visualize path integration using an interactive application.  I have found this kind of visual helps chemistry students relate calculus to thermochemical calculations.  Particularly, the calculation of heat and work involves knowledge of the transformation path.  Often times, transformation paths for heat and work results in a simplier equation, but at the cost of losing the appreciation of path dependent vs. path independent functions.  This application is used to illustrate the difference between path dependent and independent functions and at the same time permits the students to explore why state functions make thermochemical calculations easier.

Path Integral Visual

surf[x_,y_,par_]:=A1 (Exp[-(x-x1)^2/w]*Exp[-(y-y1)^2/w])+A2(Exp[-(x-x2)^2/w]*Exp[-(y-y2)^2/w])+A3 (Exp[-(x-x3)^2/w]*Exp[-(y-y3)^2/w])+A4 (Exp[-(x-x4)^2/w]*Exp[-(y-y4)^2/w])+A5 (Exp[-(x-x5)^2/w]*Exp[-(y-y5)^2/w])/.par

surpar={A1->7.73,A2->7.12,A3->7.92,A4->7.54,A5->7.16,w->3.36,x1->0.5,x2->2.,x3->3.0500000000000007,x4->-1.0999999999999996,x5->-2.8999999999999995,y1->-1.5999999999999996,y2->-4.55,y3->0.3000000000000007,y4->1.3500000000000014,y5->-3.3};

Manipulate[GraphicsGrid[{{Show[Plot3D[surf[x,y,surpar],{x,-10,10},{y,-10,10},PlotRange->All,AxesLabel->{Style["x",18,Bold],Style["y",18,Bold],Style["z",18,Bold]},ImageSize->{300,300}],ParametricPlot3D[{a Sin[x 2π]Exp[-x/b]+position[[1]],  a Cos[x 2π]Exp[-x/b]+position[[2]],surf[a Sin[x 2π]Exp[-x/b]+position[[1]],  a Cos[x 2π]Exp[-x/b]+position[[2]],surpar]},{x,0,c},PlotRange->All,PlotStyle->{Directive[Red,Thick]},ImageSize->{200,200}]],ParametricPlot[{a Sin[x 2π]Exp[-x/b]+position[[1]],a Cos[x 2π]Exp[-x/b]+position[[2]]},{x,1,c},AxesOrigin->{-10,-10},PlotRange->{{-10,10},{-10,10}},FrameLabel->{Style["x",18,Bold],Style["y",18,Bold]},Frame->True,ImageSize->{200,200}]},{Plot[surf[a Sin[x 2π]Exp[-x/b]+position[[1]], a Cos[x 2π]Exp[-x/b]+position[[2]],surpar],{x,0,c},AxesOrigin->{0,0},PlotRange->{{0,c},All},Filling->Axis,Frame->True,FrameLabel->{Style["x",18,Bold],Style["f[x,y(x)]",18 ,Bold]}],TableForm[{{NIntegrate[surf[a Sin[x 2π]Exp[-x/b]+position[[1]], a Cos[x 2π]Exp[-x/b]+position[[2]],surpar],{x,0,c}]}},TableHeadings->{None,{Style["Value of Path Integral",12,Bold]}}]}},Frame->True],Style["Path Parameters",12, Bold],{{a,1,"Size of Circle"},1,10},Delimiter,{{b,1,"Decay Time"},1,20},Delimiter,{{c,2,"Number of Points"},2,20},Delimiter,Style["Path Position",12,Bold],{position,{-10,-10},{10,10}},Delimiter,Style["Adjust the parameters of this graphing function 
to get a spatial feel for how path integrals behave.",14],ControlPlacement->Right, SaveDefinitions->True]